package com.bg.sparkproject.pattern.strategy;

/**
 * @Auther: zhengshunzhi
 * @Date: 2019/1/4 16:17
 * @Description: 策略上下文
 */
public class StrategyContext {
    private IStrategy strategy;

    public StrategyContext(IStrategy strategy) {
        this.strategy = strategy;
    }

    public int calc(int a, int b) {
        return strategy.calc(a, b);
    }
}
